<?php

namespace common\models\base;

use Yii;

/**
 * This is the model class for table "{{%fico_early_warning}}".
 *
 * @property string $id
 * @property string $mobile
 * @property string $idcard
 * @property int $created_at
 * @property string $ret_code
 * @property string $score_id
 * @property string $err_msg
 * @property string $reason
 * @property string $risk_level
 * @property string $other_data
 * @property string $resp_data
 * @property int $import_type
 */
class FicoEarlyWarning extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%fico_early_warning}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['mobile', 'idcard', 'created_at', 'ret_code', 'score_id'], 'required'],
            [['created_at', 'import_type'], 'integer'],
            [['other_data', 'resp_data'], 'string'],
            [['mobile', 'risk_level'], 'string', 'max' => 20],
            [['idcard'], 'string', 'max' => 50],
            [['ret_code', 'score_id'], 'string', 'max' => 191],
            [['err_msg', 'reason'], 'string', 'max' => 255],
            [['mobile', 'idcard'], 'unique', 'targetAttribute' => ['mobile', 'idcard']],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'mobile' => Yii::t('app', 'Mobile'),
            'idcard' => Yii::t('app', 'Idcard'),
            'created_at' => Yii::t('app', 'Created At'),
            'ret_code' => Yii::t('app', 'Ret Code'),
            'score_id' => Yii::t('app', 'Score ID'),
            'err_msg' => Yii::t('app', 'Err Msg'),
            'reason' => Yii::t('app', 'Reason'),
            'risk_level' => Yii::t('app', 'Risk Level'),
            'other_data' => Yii::t('app', 'Other Data'),
            'resp_data' => Yii::t('app', 'Resp Data'),
            'import_type' => Yii::t('app', 'Import Type'),
        ];
    }
}
